<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>

<html>
<head>

<!-- <script type="text/javascript" src="js/CheckCardIDUtil.js"> -->
<script type="text/javascript">
var listUrl="rest/userList.do";
var sexJson; 
var userStatusJson;
var city;


$(document).ready(function () {         
	sexJson=syncGetDictListByTypeName('sex');
	
	//orgTreeJson=syncGetOrgTree();
	city = syncGetDictListByTypeName('city');
})//end ready

function saveUser() {
	//$('#user-fm').birthday 编辑日期表单值，然后提交
    $('#user-fm').form('submit', {
        url: 'rest/userAdd.do',        
        onSubmit: function (identificationCard) {
        	
        },
        success: function (result) {
        	$.messager.progress('close'); 
            var result = eval('(' + result + ')');
            if (result.retCode=='0000') {
            	back('user/index.do');
                
            } else {
                $.messager.show({
                    title: 'Error',
                    msg: result.retMsg
                });
            }
        }
    });
}

function back(url){
	$.get(url, {}, function(data){
		$("#center").empty();
        $("#center").html(data);
        $.parser.parse($("#center"));
    });
}

$('#sex').combobox({
	onLoadSuccess :function(){
	$('#sex').combobox('select','0');
	}
});
</script>
</head>
<body>
		
<div class="linkbar"><a>系统</a>/<a>用户管理</a>/<a> 新增用户</a></div>
<!-- 		<div class="breadcrumb">系统 &gt;&gt; 用户管理 &gt;&gt; 新增用户</div> -->
		<div id="user-add" 	buttons="#user-add-buttons">
			<form id="user-fm" method="post" novalidate>
			<div class="fitem">
				<label>用户名:</label> <input name="username"
					class="easyui-validatebox" missingMessage="该输入项不能为空！"
					required="true" validType="mobile"/>
			</div>

			<div class="fitem">
				<label>管理员姓名:</label> <input name="adminName"
					class="easyui-validatebox" missingMessage="该输入项不能为空！"
					required="true" />
			</div>

			
			

			<input type="hidden" name="status" value="1" class="easyui-validatebox">						
			</form>
		</div>
		<div id="dlg-buttons">
			<a href="#" class="easyui-linkbutton" iconCls="icon-ok" 	onclick="saveUser()">保存</a> 
			<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="back('user/index.do')">返回</a>
		</div>
		

</body>
</html>